﻿using System;
using System.Diagnostics.CodeAnalysis;

namespace Ooaavee.Events
{
    /// <summary>
    /// The parameters of the standard event handler signature.
    /// </summary>
    /// <typeparam name="TEventArgs">The type of event-specific data.</typeparam>
    public sealed class StandardEventParameters<TEventArgs> where TEventArgs : EventArgs
    {
        /// <summary>
        /// The first parameter of the standard event handler signature.
        /// </summary>
        /// <remarks>
        /// The first parameter is named sender and is of type <see cref="Object"/>. 
        /// This is the object that raised the event.
        /// </remarks>
        public object Sender { get; internal set; }

        /// <summary>
        /// The second parameter of the standard event handler signature.
        /// </summary>
        /// <remarks>
        /// The second parameter is named e and is of type <see cref="EventArgs"/> or a derived class of <see cref="EventArgs"/>. 
        /// This is the event-specific data.
        /// </remarks>
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "E is a good name.")]
        public TEventArgs E { get; internal set; }
    }
}